<% unless turbo_frame_request? %>
  <% content_for :page_title do %>
    <%= page_header_back_button spree.admin_user_path(@user) %>
    <%= Spree.t(:store_credits) %>
  <% end %>

  <% content_for :page_actions do %>
    <%= render_admin_partials(:store_credits_actions_partials) %>
    <%= link_to_with_icon 'plus', Spree.t(:add_store_credit), spree.new_admin_user_store_credit_path(@user), class: "btn btn-primary" if can?(:create, Spree::StoreCredit) %>
  <% end %>
<% end %>

<%= render_admin_partials(:store_credits_header_partials) %>

<div class="card-lg">
  <% if params[:frame_name].present? %>
    <%= turbo_frame_tag params[:frame_name], autoscroll: true, data: { autoscroll_block: :nearest, autoscroll_behavior: :smooth } do %>
      <%= render 'list' %>
    <% end %>
  <% else %>
    <%= render 'list' %>
  <% end %>
</div>
